package com.lwj.controller;

import com.github.pagehelper.PageInfo;
import com.lwj.entity.Tecruitment;
import com.lwj.service.TecruitmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by LWJ on 2018/5/14.
 */

@RestController
@RequestMapping("/competition")
public class CompetitionController {

    @Autowired
    private TecruitmentService tecruitmentService;

    @GetMapping("")
    public PageInfo<Tecruitment> getTecruitments(@RequestParam(value = "pageNo",defaultValue ="1" )int pageNo, @RequestParam(value = "pageSize",defaultValue ="1" )int pageSize){
        return tecruitmentService.getTecruitments(pageNo,pageSize);
    }
}
